import request from './api'

export async function getRecommend (page: number, size: number) {
  try {
    let ret = await request.get(`/sight/getRecommendSight?&page=${page}&size=${size}`)
    return ret .data?.sightInfo??{}
  } catch (err) {
    return {}
  }

}

export async function getRecommendSight (page: number, size: number) {
  try {
    let ret = await request.get(`/sight/getRecommendSight?&page=${page}&size=${size}`)
    return ret .data?.sightInfo??{}
  } catch (err) {
    return {}
  }
}

export async function getSearchSight (word: string, {page, size}: {page: number, size: number}) {
  try {
    let ret = await request.get(`/sight/searchSight?word=${word}&page=${page}&size=${size}`)
    return ret.data?.searchSightInfo??{}
  } catch (e) {
    return {}
  }
}
